<%@ page import="com.kechen.pojo.Employee" %>
<%@ page import="java.util.List" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%
    List<Employee> emps=(List<Employee>)request.getAttribute("emps");
%>

<a href="<%=request.getContextPath()%>/ad.jsp">添加员工</a>
<table  border="1" width=500>
    <tr>
        <td>序号</td><td>名称</td><td>地址</td><td>薪资</td><td colspan="2">操作</td>
    </tr>
    <%
        for(Employee emp:emps){
    %>
    <tr>
        <td><%=emp.getId()%></td><td><%=emp.getName() %></td><td><%=emp.getAge() %></td>><td><a href="ShowServlet?id=<%=emp.getId()%>">修改</a></td><td><a href="DeleteServlet?id=<%=emp.getId()%>">删除</a></td>
    </tr>
    <%
        }
    %>
</table>

</body>
</html>
